#ifndef _SHADOW_MUTEX_LOCKER_
#define _SHADOW_MUTEX_LOCKER_

#include <pthread.h>

#include <log4cxx/logger.h>
#include <log4cxx/xml/domconfigurator.h>

class MutexLocker {
	public:
		MutexLocker(pthread_mutex_t * p_mutex);
		int lock();
		int unlock();
		~MutexLocker();
	private:
		pthread_mutex_t * _p_mutex;
		bool _is_locked;
		log4cxx::LoggerPtr _logger;
};

#endif
